<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.model.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<title>出车记录</title>
</head>
<%
	Connection con = DataBase.getConnection();
%>
<body class="ContentBody">
	<table style="width: 100%; height: 100%;" border="1px"
		cellspacing="0px" cellpadding="4px">
		<tr align="center">
			<td colspan="9"
				style="font-size: 16px; font-weight: 900;" class="tablestyle_title">出车记录</td>
		</tr>
		<tr style="height: 20px;" class="zsd" align="center">
			<td style="width: 20%">时间</td>
			<td style="width: 20%">车牌号</td>
			<td style="width: 20%">车辆型号</td>
			<td style="width: 20%">出车人</td>
			<td style="width: 20%">回车情况</td>
		</tr>
		<%
			PreparedStatement pstmt = con.prepareStatement("SELECT carry.time,carry.lpn,car.model,carry.user,carry.back FROM carry LEFT JOIN car ON car.lpn=carry.lpn ORDER BY carry.time DESC");
			ResultSet rs = pstmt.executeQuery();
			while( rs.next() ) {
		%>
		<tr>
			<td><%=rs.getString(1) %></td>
			<td><%=rs.getString(2) %></td>
			<td><%=rs.getString(3) %></td>
			<td><%=rs.getString(4) %></td>
			<td><%=rs.getString(5)==null?"未回":rs.getString(5) %></td>
		</tr>
		<%}
		%>
	</table>
</body>
<%
	con.close();
%>
</html>